using UnityEngine;

namespace Utils
{
    public static class VectorExtend
    {
        public static Vector3 ToVector3(this Vector2Int vector2Int , float height = 0)
        {
            return new Vector3(vector2Int.x , height , vector2Int.y);
        }

        public static Vector3 ToVector3(this Vector2 vector2, float height = 0)
        {
            return new Vector3(vector2.x, height, vector2.y);
        }

        public static Vector2 ToVector2(this Vector3 vector3)
        {
            return new Vector2(vector3.x , vector3.z);
        }

        public static float GetDistance(this Vector2Int vector)
        {
            return Vector2Int.Distance(Vector2Int.zero , vector);
        }

        
        public static float GetDistance(this Vector2 vector)
        {
            return Vector2.Distance(Vector2.zero, vector);
        }

        public static float GetDistance(this Vector3 vector)
        {
            return Vector3.Distance(Vector3.zero, vector);
        }
    }
}